﻿using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace T.Materials.Repository.Migrations
{
    /// <inheritdoc />
    public partial class n8 : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.RenameColumn(
                name: "MaterialStatisticsId",
                table: "StorageMaterials",
                newName: "User_Id");

            migrationBuilder.RenameColumn(
                name: "Titlte",
                table: "MaterialRequisitions",
                newName: "Title");

            migrationBuilder.AddColumn<string>(
                name: "CompanyID",
                table: "StorageMaterials",
                type: "nvarchar(max)",
                nullable: true);

            migrationBuilder.AddColumn<int>(
                name: "MaterialRequisitionId",
                table: "StorageMaterials",
                type: "int",
                nullable: false,
                defaultValue: 0);
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "CompanyID",
                table: "StorageMaterials");

            migrationBuilder.DropColumn(
                name: "MaterialRequisitionId",
                table: "StorageMaterials");

            migrationBuilder.RenameColumn(
                name: "User_Id",
                table: "StorageMaterials",
                newName: "MaterialStatisticsId");

            migrationBuilder.RenameColumn(
                name: "Title",
                table: "MaterialRequisitions",
                newName: "Titlte");
        }
    }
}
